package com.sinog.front.feign.basic;

import com.sinog.core.utilbean.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import java.util.Map;

/**
 * @desc 角色管理接口
 * @author -
 * @date -
 */
@FeignClient("sinog2c-basic")
public interface RoleResService {

    /**
     * 获取角色资源列表
     * @param roleid roleid
     * @return String
     */
    @GetMapping("/role/resource/tree")
    String getRoleResourcesTree(@RequestParam("roleid") String roleid);

    /**
     * 保存角色资源列表
     * @param resMap resMap
     * @param roleid roleid
     * @param userName userName
     * @return Result
     */
    @PostMapping("/role/resource")
    Result saveRoleResources(
            @RequestBody Map<String,String> resMap,
            @RequestParam("roleid") String roleid,@RequestParam("userName") String userName);
}